Data

This data was taken from a clean dataset that Jae emailed out on October 25th, 2019.

Jae organized the retina by six different methods. He created OCTA variable scores for the overall image, 2 hemifields, 4 quadrants, 6 sectors, 12 clock hours, and an annular ring.

For now, only the overall image scoring will be analyzed.

I manually removed underscores from the names of each patient because it was causing uneven splitting of variables. This modified dataset is saved as all_quantification_10_24_19_DG.xlsx. I updated the names for every tab of the file.

Data Dictionary

Variable Label
ptid Patient Identification
eyeid Eye Identification
eye_imaged Eye Imaged
time_stamp Exam Date and Time
name_last Last Name
name_first First Name
female Female Sex
image_area Image Area
image_method Image Method
image_size Image Size
v_diameter Vessel Diameter (units?)
v_area_density Vessel Area Density (units?)
v_skeleton_density Vessel Skeleton Density (units?)
v_perimeter_index Vessel Perimeter Index (units?)
v_complexity_index Vessel Complexity Index (units?)
flow_impair_zone Flow Impairment Zone (units?)
flux Flux (units?)

Data Wrangling

Rename Variables

This section will rename the variables to match the dictionary

Label Variables

This section will label variables appropriately.

Single Eye Participation

Venugopal (2019) et al. ran the analysis including all eyes.1 Then they re-ran the analysis after selecting only a single eye randomly from each individual. They conclude minimal difference in the findings, and they report only the analysis that includes all eyes:

“The entire analysis was repeated considering one eye per subject (one eye was randomly chosen from subjects contributing both eyes for the primary analysis) and all the results were similar to the primary analysis.”1

Based on this, analysis was performed on all eyes. If time permits, remove a random eye later.

Subsetting Cohorts

Intra-Visit Data

Intra-visit data was restricted to all measurements of the same eye that occurred on the same day. Some people had multiple measurements on multiple days. Their first day was included only.

Inter-Visit Data

Inter-visit data was restricted to the first measurement of the day for each eye. If a patient had their right eye measured:

  • 3 times on Monday

  • 5 times on Wednesday, and

  • 2 times on Friday,

Then they would have three observations in this dataset:

  • The first measurement from Monday,

  • The first measurement from Wednesday, and

  • The first measurement from Friday.

Data Flow Chart

This tallies how many participants, how many eyes, and how many measurements are included in the two datasets.

dataset n_participants n_eyes n_measurements
Intra-Visit 88 88 214
Inter-Visit 88 88 241

Table 1: Summary Statistics

The Venugopal papers dichotomize glaucoma. But there’s no glaucoma indicator variable in this data.

Intra-Visit OCTA Summary Statistics

Variables in intra-visit dataset

Overall
n 214
Sociodemographics
Female Sex = Male (%) 107 ( 50.0)
Image Specifications
Eye Imaged = Right (%) 112 ( 52.3)
Image Area = ONH (%) 214 (100.0)
Image Method = Angiography (%) 214 (100.0)
Image Size = 6x6 (%) 214 (100.0)
OCTA Measures
v_diameter (mean (SD)) 26.73 (1.53)
v_area_density (mean (SD)) 0.31 (0.07)
v_skeleton_density (mean (SD)) 0.12 (0.03)
v_perimeter_index (mean (SD)) 0.27 (0.06)
v_complexity_index (mean (SD)) 6764.17 (1683.47)
flow_impair_zone (mean (SD)) 13.34 (5.78)
flux (mean (SD)) 0.09 (0.03)

Inter-Visit OCTA Summary Statistics

Variables in inter-visit dataset

Overall
n 241
Sociodemographics
Female Sex = Male (%) 120 ( 49.8)
Image Specifications
Eye Imaged = Right (%) 124 ( 51.5)
Image Area = ONH (%) 241 (100.0)
Image Method = Angiography (%) 241 (100.0)
Image Size = 6x6 (%) 241 (100.0)
OCTA Measures
v_diameter (mean (SD)) 26.91 (1.53)
v_area_density (mean (SD)) 0.30 (0.07)
v_skeleton_density (mean (SD)) 0.11 (0.03)
v_perimeter_index (mean (SD)) 0.26 (0.06)
v_complexity_index (mean (SD)) 6506.75 (1657.82)
flow_impair_zone (mean (SD)) 14.21 (5.89)
flux (mean (SD)) 0.09 (0.03)

Exploratory Data Analysis

Scatter Plots

Scatter plots of OCTA variables by Subject ID for about 10 individuals randomly sampled. These are separated by intra- and inter-visit datasets, and are useful for understanding the data better.

Vessel Area Density

Vessel Diameter

Vessel Skeleton Density

Vessel Perimeter Index

Vessel Complexity Index

Flow Impairment Zone

Flux

Spaghetti Plots

Spaghetti plots of OCTA variables for about 10 individuals randomly sampled.

Vessel Area Density

Vessel Diameter

Vessel Skeleton Density

Vessel Perimeter Index

Vessel Complexity Index

Flow Impairment Zone

Flux

Bland-Altman Plots

Coding of Bland-Altman (BA) plots is explained in this blog post.

Intra-Visit Bland-Altman Plots

Intra-Visit Bland-Altman Plots of OCTA Variables

Vessel Area Density

Vessel Diameter

Vessel Skeleton Density

Vessel Perimeter Index

Vessel Complexity Index

Flow Impairment Zone

Flux

Outliers

Assess some of the observations outside of expected limits.

eyeid ptid female eye_imaged image_area image_size image_method exam_date time_stamp v_diameter v_area_density v_skeleton_density v_perimeter_index v_complexity_index flow_impair_zone flux n_msr_day order_obs
51 282473 Female Right ONH 6x6 Angiography 2018-06-06 2018-06-06 08:40:00 25.93101 0.3902833 0.15050833 0.3379056 8381.144 6.6914 0.12373317 2 1
51 282473 Female Right ONH 6x6 Angiography 2018-06-06 2018-06-06 08:40:26 26.27997 0.3760444 0.14309167 0.3254833 8070.696 8.1147 0.11683929 2 2
55 628341 Male Left ONH 6x6 Angiography 2019-06-07 2019-06-07 14:30:44 25.88282 0.3783278 0.14616944 0.3244944 7973.315 8.2583 0.11072197 3 1
55 628341 Male Left ONH 6x6 Angiography 2019-06-07 2019-06-07 14:31:19 25.95159 0.3862389 0.14883056 0.3309722 8124.932 7.2814 0.11382017 3 2
55 628341 Male Left ONH 6x6 Angiography 2019-06-07 2019-06-07 14:31:50 25.95025 0.3819444 0.14718333 0.3274639 8043.022 8.4359 0.11355101 3 3
56 6542715 Female Right ONH 6x6 Angiography 2018-06-08 2018-06-08 09:22:14 26.78206 0.2722694 0.10166111 0.2382194 5971.015 15.8414 0.07450450 2 1
56 6542715 Female Right ONH 6x6 Angiography 2018-06-08 2018-06-08 09:23:17 26.81264 0.2639556 0.09844444 0.2304417 5763.467 18.6593 0.07445278 2 2
122 747043 Female Left ONH 6x6 Angiography 2017-09-15 2017-09-15 13:29:19 26.59804 0.2874583 0.10807500 0.2533972 6399.137 16.7726 0.10800771 2 1
122 747043 Female Left ONH 6x6 Angiography 2017-09-15 2017-09-15 13:29:47 25.94536 0.3165694 0.12201389 0.2788667 7037.475 13.2636 0.12183979 2 2

Inter-Visit Bland-Altman Plots

Inter-Visit Bland-Altman Plots of OCTA Variables

Vessel Area Density

Vessel Diameter

Vessel Skeleton Density

Vessel Perimeter Index

Vessel Complexity Index

Flow Impairment Zone

Flux

Outliers

Assess some of the observations outside of expected limits.

eyeid ptid female eye_imaged image_area image_size image_method exam_date time_stamp v_diameter v_area_density v_skeleton_density v_perimeter_index v_complexity_index flow_impair_zone flux order_obs
30 193139 Female Right ONH 6x6 Angiography 2016-09-09 2016-09-09 15:13:23 26.23789 0.3408083 0.12989167 0.2919389 7164.177 10.2600 0.09524546 1
30 193139 Female Right ONH 6x6 Angiography 2018-07-11 2018-07-11 11:18:55 26.19840 0.3279167 0.12516667 0.2856750 7129.739 12.1180 0.09051529 2
42 2150911 Male Right ONH 6x6 Angiography 2017-02-02 2017-02-02 09:15:53 28.35113 0.2286833 0.08066111 0.1930806 4670.197 19.3388 0.05390471 1
42 2150911 Male Right ONH 6x6 Angiography 2018-03-16 2018-03-16 09:03:54 27.98481 0.2457222 0.08780556 0.2059083 4943.062 20.9478 0.06139227 2
45 2268221 Female Left ONH 6x6 Angiography 2016-04-08 2016-04-08 15:25:44 25.80397 0.3712833 0.14388611 0.3251139 8155.643 9.2576 0.11410269 1
45 2268221 Female Left ONH 6x6 Angiography 2018-08-01 2018-08-01 11:34:29 25.46237 0.3724083 0.14625833 0.3272194 8236.666 9.5715 0.11233931 2
75 6940843 Male Left ONH 6x6 Angiography 2018-07-18 2018-07-18 09:56:10 25.52325 0.3879250 0.15198889 0.3386278 8468.179 6.9282 0.15327855 1
75 6940843 Male Left ONH 6x6 Angiography 2019-03-13 2019-03-13 08:56:32 25.51250 0.3918861 0.15360556 0.3412472 8512.772 7.2516 0.15397024 2
138 977501 Male Left ONH 6x6 Angiography 2018-05-11 2018-05-11 10:12:42 25.64060 0.3650722 0.14238056 0.3200639 8038.726 9.8839 0.10977392 1
138 977501 Male Left ONH 6x6 Angiography 2018-08-01 2018-08-01 08:51:34 25.47587 0.3616583 0.14196111 0.3166472 7942.286 9.8326 0.10700698 2

Intra-Visit Repeatability

Intra-Visit Repeatability of OCTA Variables

Calculate the within-subject standard deviation \((S_w)\), the within-subject coefficient of repeatability \((CR_w)\), and the within-subject coefficient of variation \((CV_w)\) for a given measurement variable \(x\).

Table 2: Repeatability

Table 2 shows repeatability estimates of vessel density measurements.

This table was modeled after Table 2 in Venugopal (2018).2 They stratified these values by dichotomous glaucoma status, but we’re not sure if that is appropriate.

var_name µ Sw CRw CVw
Vessel Diameter (units?) 26.734 0.294 0.816 1.101
Vessel Area Density (units?) 0.314 0.015 0.041 4.678
Vessel Skeleton Density (units?) 0.119 0.006 0.017 5.108
Vessel Perimeter Index (units?) 0.272 0.013 0.035 4.658
Vessel Complexity Index (units?) 6764.168 315.502 874.526 4.664
Flow Impairment Zone (units?) 13.341 1.385 3.840 10.384
Flux (units?) 0.092 0.006 0.016 6.172

I still need to figure out how they calculated the 95% CIs, which I think is just \(1.96*\sqrt{SE}\) because they all appear symmetric, but I’m not sure yet. Then I need to stratify these stats by glaucoma diagnosis (yes/no). - DG 8/29/2019

Bruce showed me a paper that has the calculation of the confidence intervals. It’s not difficult to manually code them, just need to read the paper. - DG 9/4/2019

Calculating Repeatability Statistics

Explanations of repeatability statistic calculations

Within-Subject Mean \((\mu_w)\)

\(\mu_w\) is the average measurement of both eyes for each individual. The overall mean \((\mu)\) is calculated by taking the mean of \(\mu_w\) across the dataset. The overall mean is included in the final table for reference.

\[ \mu_w = \frac{1}{M}\sum_{i=1}^{M} x_i \]

\[\text{where } M \text{ is the number of measurements per eye,}\]

Within-Subject Standard Deviation \((S_w)\)

Find \(S_w\) by first calculating the variance of the measurements per individual eye. The equation below is general for any number of measurements, but in this study there are only 2 measurements per eye.

\[ \sigma^2_{measurement} = \frac{1}{M}\sum_{i=1}^{M} (x_i - \mu_w)^2 \]

\[ \text{where } M \text{ is the number of measurements per eye} \]

To calculate \(S_w\), average of the variance of measurements \((\sigma^2_{measurement})\) for all eyes measured, then take the square root.

\[ Sw = \sqrt{\frac{1}{N}\sum_{i=1}^{N}\sigma^2_{measurement,i}} \]

\[ \text{where } N \text{ is the number of eyes measured} \]

Within-Subject Coefficient of Repeatability \((CR_w)\)

The \(CR_w\) provides the uncertainty of repeated measures.

\[ CRw = \sqrt2 * 1.96 * Sw \]

The \(CR_w\) can be interpreted as:

“The difference between two measurements for the same subject is expected to be less than [\(CR_w\)] for 95% of pairs of observations.”3

Within-Subject Coefficient of Variation \((CV_w)\)

\[ CVw = 100 *\frac{Sw}{\mu} \]

Intraclass Correlation Coefficient

Intraclass Correlation Coefficient (ICC)

Intra-Visit ICC

V1 ICC LowerCI UpperCI N k varw vara
v_diameter 0.963 0.946 0.975 88 2.431 0.088 2.256
v_area_density 0.960 0.942 0.973 88 2.431 0.000 0.005
v_skeleton_density 0.965 0.949 0.976 88 2.431 0.000 0.001
v_perimeter_index 0.964 0.948 0.976 88 2.431 0.000 0.004
v_complexity_index 0.967 0.952 0.978 88 2.431 93817.712 2760126.986
flow_impair_zone 0.945 0.920 0.962 88 2.431 1.859 31.788
flux 0.960 0.943 0.973 88 2.431 0.000 0.001

Inter-Visit ICC

V1 ICC LowerCI UpperCI N k varw vara
v_diameter 0.924 0.892 0.947 88 2.734 0.181 2.182
v_area_density 0.923 0.891 0.946 88 2.734 0.000 0.005
v_skeleton_density 0.924 0.893 0.948 88 2.734 0.000 0.001
v_perimeter_index 0.926 0.896 0.949 88 2.734 0.000 0.004
v_complexity_index 0.929 0.900 0.951 88 2.734 196858.415 2574192.567
flow_impair_zone 0.875 0.826 0.912 88 2.734 4.384 30.578
flux 0.896 0.854 0.928 88 2.734 0.000 0.001

Calculating ICC Statistic

\[ \text{ICC} = \frac{\text{between}}{\text{between} + \text{within}}\]

“In the output for the random effects model ‘SID’ is the estimated between-group variance, which in the ICCest output is called ‘vara’ (variance among groups). The within-group variance is ‘Residual’ in the random effects model output, while in ICCest it’s called ‘varw.’ You can see that the values for those two variances match perfectly in the two different outputs. The ICC is defined as between/(between+within). That calculation is not part of the random effects model output, but it is part of the ICCest output, along with confidence intervals for the ICC estimate. The ICC are really high for intravisit (around 97%) and a little lower for intervisit (about 94%). If we were to calculate these ICC for glaucoma and controls separately I think they would be significantly lower because of the reduced between-group variability.” - BB 9/4/2019

Mixed Effects Regression Models

Model Fitting

“For the markdown file let’s just spit out all the output from the random effects model and the iccest command so we can show it to Grace. Eventually we can put the ICC in the table with the other repeatability measures you have already tabled but I don’t think we need it for the meeting. I also added a model to test whether SS influences reliability. The reference level is ‘10’ now, which is what we want, and you can see that SS is highly associated with VAD, meaning it affects reliability.” - BB 9/4/2019

## Linear mixed model fit by REML ['lmerMod']
## Formula: v_area_density ~ (1 | ptid)
##    Data: data_octa_global_intra
## 
## REML criterion at convergence: -848.9
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -4.5112 -0.4821  0.0322  0.4694  4.4542 
## 
## Random effects:
##  Groups   Name        Variance  Std.Dev.
##  ptid     (Intercept) 0.0048661 0.06976 
##  Residual             0.0002012 0.01418 
## Number of obs: 214, groups:  ptid, 88
## 
## Fixed effects:
##             Estimate Std. Error t value
## (Intercept) 0.310503   0.007502   41.39

References

1. Venugopal JP, Rao HL, Weinreb RN, et al. Repeatability and comparability of peripapillary vessel density measurements of high-density and non-high-density optical coherence tomography angiography scans in normal and glaucoma eyes. The British Journal of Ophthalmology 2019;103:949–954.

2. Venugopal JP, Rao HL, Weinreb RN, et al. Repeatability of vessel density measurements of optical coherence tomography angiography in normal and glaucoma eyes. The British Journal of Ophthalmology 2018;102:352–357.

3. Bland JM, Altman DG. Statistics Notes: Measurement error. BMJ : British Medical Journal 1996;313:744.